import request from '@/utils/request'

export function getCoupons(query) {
  return request({
    url: '/promotion/coupon/getList',
    method: 'post',
    data: query
  })
}

export function getCoupon(id) {
  return request({
    url: '/promotion/coupon/getDetail',
    method: 'post',
    data: id
  })
}

export function saveCoupon(id) {
  return request({
    url: '/promotion/coupon/save',
    method: 'post',
    data: id
  })
}

export function removeCouponByID(id) {
  return request({
    url: '/promotion/coupon/delete',
    method: 'post',
    data: id
  })
}

export function changeCouponStatusByID(formdata) {
  return request({
    url: '/promotion/coupon/change-status',
    method: 'post',
    data: formdata
  })
}

